import Vue from 'vue'
import Router from 'vue-router'
import login from '../views/login'
import register from '../views/register'
import home from '../views/home'
import film from '../views/film'
import cinema from '../views/cinema'
import cinema1 from '../views/cinema1'
import detail from '../views/detail'
import cinemadetail from '../views/cinemadetail'
import center from '../views/center'
import profile from '../views/profile'
import order from '../views/order'
import seat from '../views/seat'
import pay from '../views/pay'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/',
      redirect:"/home"
    },
    {
      path:'/home',
      component:home
    },
    {
      path:'/login',
      component:login
    },
    {
      path:'/register',
      component:register
    },
    {
      path:'/film',
      component:film
    },
    {
      path:'/cinema/:myid',
      component:cinema
    },
    {
      path:'/cinema1',
      component:cinema1
    },
    {
      path:'/detail/:myid',
      component:detail
    },
    {
      path:'/cinemadetail',
      component:cinemadetail
    },
    {
      path:'/center',
      component:center,
      children:[
        {
          path:'/',
          redirect:'/center/order'
        },
        {
          path:'order',
          component:order
        },
        {
          path:'profile',
          component:profile
        }
      ]
    },
    {
      path:"/seat",
      component:seat
    },
    {
      path:"/pay",
      component:pay
    }
  ]
})
